package fjdz;

public class Zidan extends Suoyoufxw {
	int dir;
	public Zidan(int hx,int hy,int dir){
		img = Gongjutp.getImg("/img/fire.png");
		w = 80;
		h = 80;
		x = hx;
		y = hy;
		this.dir = dir;
	}

	public void move() {
		if(dir==0) {
			y-=50;
			x-=2;
		}
		else if(dir==1) {
			y-=50;
		}
		else if(dir==2) {
			y-=50;
			x+=2;
		}
		else if(dir==4) {
			y-=20;
		}
	}
	
	public boolean jizhongbs(BossDiji bsdj) {
		boolean hit = x<=bsdj.x+bsdj.w&&
				  x>=bsdj.x-w&&
			      y<=bsdj.y+bsdj.h&&
			      y>=bsdj.y-h;
		return hit;
	}
	
	
}
